package com.tul.exercise.base.java8.stream.exercise;

import java.util.function.Predicate;

/**
 *
 */
public class IntpredTest {
    public boolean check(Intpred intpred) {
        System.out.println("check(Intpred intpred)");
        return  false;
    }

    public boolean check(Predicate<Integer> predicate) {
        System.out.println("check(Predicate<Integer> predicate)");
        return true;
    }


    public static void main(String[] args) {
        IntpredTest test = new IntpredTest();
        Intpred intpred = x -> x > 5;
        Predicate<Integer> predicate = x -> x>5;

        test.check(intpred);

        test.check(predicate);


        // 编译不通过
        //test.check( x-> x>5);

    }
}

